home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 051-075 / disk_055 / pipedevice / poster < prev   
Text File  |  1992-05-06  |  3KB  |  65 lines

  1. Article 1977 of comp.sys.amiga:
  2. Path: mcdsun!noao!hao!hplabs!ucbvax!CORY.BERKELEY.EDU!dillon
  3. From: dillon@CORY.BERKELEY.EDU (Matt Dillon)
  4. Newsgroups: comp.sys.amiga
  5. Subject: PIPE: device (1.2 only)    *******
  6. Message-ID: <8702062012.AA14465@cory.Berkeley.EDU>
  7. Date: 6 Feb 87 20:12:17 GMT
  8. Sender: daemon@ucbvax.BERKELEY.EDU
  9. Organization: University of California at Berkeley
  10. Lines: 608
  11.  
  12.  
  13.     Here's a PIPE device.  I would like to thank Phillip Lindsay
  14. for providing the skeleton device driver which I used as a base.  This
  15. will ONLY WORK WITH 1.2!!.  Example (run all at once):
  16.  
  17. CLI window 1:    copy hugefile pipe:a
  18. CLI window 2:    copy pipe:a pipe:b
  19. CLI window 3:    copy pipe:b pipe:c
  20. CLI window 4:    copy pipe:c pipe:d
  21. CLI window 5:    copy pipe:d pipe:e
  22. CLI window 6:    wordcount pipe:e        (or something similar)
  23.  
  24.     You can, of course, use any rendezvous name you wish.  The device
  25. uses a 4K internal buffer per name, but is optimized to take advantage of
  26. the situation in which there is a pending read and a pending write. In this
  27. case it copies direct rather than go through its internal buffer.  This is
  28. a true pipe, and thus the source and destination processes must be distinct
  29. (i.e. not the same process) so as to prevent lockout situations.  The buffer
  30. is transparent in that data written, no matter how little, is immediately
  31. available to be read by the other process.
  32.  
  33.     You must place PIPE.DEVICE in 'DEVS:'.  Append the MOUNTLIST file to
  34. DEVS:MOUNTLIST (or just put it there if you do not have a DEVS:MOUNTLIST),
  35. and then do a 'MOUNT PIPE:' in your startup script.
  36.  
  37.     The source is provided also.  Remember, since this is a device, you
  38. do NOT link with any startup module.  I have done a couple of other tests
  39. and have found that you get a huge efficiency increase when piping an IO
  40. bound program through a CPU bound program or vise versa.  This is totally
  41. public domain except for MISC.C, which is (C) to Phillip (but redistributable).
  42. The binary itself is totally public domain.
  43.  
  44. USES:
  45.  
  46.     I hope to have my shell use the PIPE: device in it's next release,
  47. but this will require huge modifications to the shell so don't expect the
  48. next release anytime soon. 
  49.  
  50. Apart from that, the PIPE: device can be useful when you have, say, two
  51. application programs and want to transfer huge amounts of data from one 
  52. (write) to the other (read) without using a temporary file in RAM: or on
  53. disk.  Assuming the application does not attempt a Seek(), you simply
  54. specify 'PIPE:name' and it looks like an ordinary file to the application.
  55.  
  56. For those terminal programs which do not use asyncronous writes, you can
  57. fix the jerkyness in CAPTURE by capturing to a pipe, and having another
  58. CLI Copy command running from the pipe to a file.
  59.  
  60.                     Have fun and report any bugs to me,
  61.  
  62.                     -Matt
  63.  
  64.     
  65.